home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / UTILSTEM / DDOSAID.LZH / FLIPSTAT.ASM < prev    next >
Assembly Source File  |  1985-12-15  |  2KB  |  57 lines

  1.            PAGE    62,132
  2.            Title   DoubleDOS Utility: Other Partition Status
  3.  
  4. CR         EQU     0Dh                      ;ASCII Carriage Return
  5. LF         EQU     0Ah                      ;ASCII Line Feed
  6. $          EQU     24h                      ;String termination charachter
  7.  
  8. Dos_Call           EQU     21h
  9. Terminate_Process  EQU     4Ch
  10. Put_String         EQU     09h
  11. DD_Other_Status    EQU     0E5h
  12.  
  13. Code_Seg   SEGMENT 
  14.            ASSUME  cs:Code_Seg,ds:Code_Seg,es:Code_Seg
  15.            ORG     0100h  
  16. Main       PROC    NEAR
  17.  
  18.            mov     ah,Put_String                 ;Display program info
  19.            mov     dx,OFFSET Prog_Info
  20.            int     Dos_Call
  21.  
  22.            mov     ah,DD_Other_Status            ;Get DoubleDOS status of
  23.            int     Dos_Call                      ;  the current partition
  24.            mov     Stat_Byte,al
  25.            
  26.            or      al,00110000b                  ;convert binary integer
  27.            mov     Stat_Var,al                   ;  to ASCII and output
  28.            mov     ah,Put_String                 
  29.            mov     dx,OFFSET Stat_Prn            ;Output Status
  30.            int     Dos_Call
  31.  
  32.            mov     ah,Put_String                 ;Errorlevel Message
  33.            mov     dx,OFFSET Finished
  34.            int     Dos_Call
  35.  
  36.            mov     al,Stat_Byte                  ;Errorlevel returned 
  37.            mov     ah,Terminate_Process          ;  in AL
  38.            int     Dos_Call
  39.  
  40. Stat_Byte  DB      ?
  41.  
  42. Prog_Info  DB      CR,LF,'DoubleDOS Utility - by Chris M. Magyar'
  43.            DB      ' - 12/15/85',CR,LF,CR,LF
  44.            DB      'Status : 0 - No program runnning.',CR,LF
  45.            DB      '         1 - Program is running.',CR,LF
  46.            DB      '         2 - Program is suspended.',CR,LF,CR,LF,$
  47.  
  48. Stat_Prn   DB      'Current Partition Status : '
  49. Stat_Var   DB      ?,CR,LF,$
  50.  
  51. Finished   DB      CR,LF,'Status is returned via ERRORLEVEL.',CR,LF,$
  52.  
  53. Main       ENDP
  54. Code_Seg   ENDS
  55.            END Main
  56.  
  57.